public class Test1 {
    public static int func(int num){
        if(num == 0){
            return 1;
        }

        return num * func(num - 1);
    }
    public static void main(String[] args) {
        System.out.println(func(5));
    }
}
